package com.haoliang.spring.context.java;

import com.haoliang.spring.context.config.MainConfig;
import com.haoliang.spring.context.model.BeanModel;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @Author zhaohaoliang
 * @Date 创建于 上午9:23 2019/3/10
 * @Description 请输入类的描述信息
 */
public class MainAnnotationContext {
    public static void main(String[] args) {

        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(MainConfig.class);
        BeanModel beanModel = applicationContext.getBean("beanModel", BeanModel.class);
        System.out.println(beanModel);

    }
}
